﻿
new Vue({
    el: '#app',
    delimiters:['[[', ']]'],

    data: {
        // bundle_id: '',
        gift_name: '',
        gift_price: '10000',
        gift_orderno: 0,
        gift_icon: '',
        gift_resource: '',
    },

    methods: {
        /**
         * 创建新的礼物
         */
        newGift() {
            let url = "{% url 'gma:api_new_gift' %}";
            let data = {
                // 'bundle_id' : this.bundle_id,
                'name' : this.gift_name,
                'price' : this.gift_price,
                'orderno' : this.gift_orderno,
                'icon' : this.gift_icon,
                'resource' : this.gift_resource,
            };
            new my_ajax(url, data, '', '', () => {
                show_toast('创建成功');
                redirect();
            });
        },

        cancel() {
            window.history.back();
        },
    },

    mounted() {
    },
});
